﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace GameSchool.Models
{
	/// <summary>
	/// TeacherCourse heldur utan um skráningar kennara á námskeið og skráir í grunninn.
	/// </summary>  

    [Table("gs_teacher_course")]
    public class TeacherCourse
    {
        [Key, Column("teacher_course_id")]
        public int TeacherCourseId { get; set; }

        [Column("teacher_id")]
        public int TeacherId { get; set; }

        [ForeignKey("TeacherId")]
        public virtual Person Teacher { get; set; }

        [Column("course_id")]
        public int CourseId { get; set; }

        [ForeignKey("CourseId")]
        public virtual Course Course { get; set; }

        [Column("is_course_owner")]
        public bool IsCourseOwner { get; set; }

        [Column("active")]
        public bool Active { get; set; }

        [Column("entry_by")]
        public int EntryById { get; set; }

        [ForeignKey("EntryById")]
        public virtual Person EntryBy { get; set; }
    }
}